package com.itheima.thread2;

import javax.lang.model.element.ModuleElement;

public class Demo02 {

    public static void main(String[] args) {
        //匿名内部类


        new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i = 0; i < 100; i++) {
                    System.out.println("我是第一个"+i);
                }
            }
        }).start();
        new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i = 0; i < 100; i++) {
                    System.out.println("我是第二个"+i);
                }
            }
        }).start();
        for (int i = 0; i < 100; i++) {
            System.out.println("我是main的"+i);
        }

    }
}
